package com.csc.banking.domain;

import java.util.Collection;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name="savinginteresrate")
public class SavingInterestRate {

	@Id
	private Integer savingInteresRateId;
	private Date createDate;
	private Double rate;
	//private Integer currency;
	//private Integer period;
	
	@OneToMany(mappedBy="savinginteresrate")
	private Collection<SavingAccount_Interestrate> savingaccount_has_interstrate;
	
	
	@ManyToOne
	@JoinColumn(name="period")
	private PeriodType periodtypes;
	
	@ManyToOne
	@JoinColumn(name="currency")
	private Currency currency;
	
	public Integer getSavingInteresRateId() {
		return savingInteresRateId;
	}

	public void setSavingInteresRateId(Integer savingInteresRateId) {
		this.savingInteresRateId = savingInteresRateId;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public Double getRate() {
		return rate;
	}

	public void setRate(Double rate) {
		this.rate = rate;
	}

//	public Integer getPeriod() {
//		return period;
//	}
//
//	public void setPeriod(Integer period) {
//		this.period = period;
//	}

	public Collection<SavingAccount_Interestrate> getSavingaccount_has_interstrate() {
		return savingaccount_has_interstrate;
	}

	public void setSavingaccount_has_interstrate(
			Collection<SavingAccount_Interestrate> savingaccount_has_interstrate) {
		this.savingaccount_has_interstrate = savingaccount_has_interstrate;
	}

	public PeriodType getPeriodtypes() {
		return periodtypes;
	}

	public void setPeriodtypes(PeriodType periodtypes) {
		this.periodtypes = periodtypes;
	}

	public Currency getCurrency() {
		return currency;
	}

	public void setCurrency(Currency currency) {
		this.currency = currency;
	}

	
}
